<template>
    <div>
      <BasicTable @register="registerTable" @resize-column="handleResizeColumn">
      </BasicTable>
    </div>
  </template>
  <script lang="ts">
  import { defineComponent } from 'vue';
import { defHttp } from '@/utils/http/axios';
  export default defineComponent({
    name: 'LogList',
  });
  </script>
  <script lang="ts" setup>
  import { onMounted } from 'vue';
  import { BasicTable, useTable, TableAction } from '@/components/Table';
  const [registerTable, { reload, getSelectRows, getSelectRowKeys }] =
    useTable({
      api: '/admin/sys_log/list',
       
      columns: [
        {
            title: '操作类型',
            dataIndex: 'type',
            width: 100, 
        },
        {
            title: '操作内容',
            dataIndex: 'operation',
            width: 200,
        },
        {
            title: '操作人员',
            dataIndex: 'username',
            width: 100,
        },
        {
            title: 'ip',
            dataIndex: 'ip',
            width: 100,
        },
        {
            title: '创建时间',
            dataIndex: 'cjrq',
            width: 200,
        },
      ],
      showIndexColumn: true,
      indexColumnProps: {
        fixed: 'left',
      },
      useSearchForm: true,
      formConfig: {
        baseColProps: {
            span: 8
        },
        schemas: [
            {
                component: 'Input',
                label: '操作内容',
                field: 'keyword',
            },
            {
                component: 'Input',
                label: '操作人员',
                field: 'username',
            },
            {
                component: 'Input',
                label: 'ip地址',
                field: 'ip',
            },
            {
                component: 'RangePicker',
                label: '时间范围',
                field: '[startDate, endDate]',
                componentProps: {
                    style: { width: '100%' },
                    format: 'YYYY-MM-DD',
                    valueFormat: 'YYYY-MM-DD',
                },

            },
        ]
      },
      pagination: true,
      bordered: true,
    });
  onMounted(() => {
  });
  </script>
  